package ke01;

import java.util.PriorityQueue;
import java.util.Queue;

public class PriorityQueueTest {

	public static void main(String[] args) {
		
		Queue<Kunde> kunden;
		kunden = new PriorityQueue<Kunde>();
		kunden.add(new Kunde(12));
		kunden.add(new Kunde(69));
		kunden.add(new Kunde(5));
		kunden.add(new Kunde(42));
		kunden.add(new Kunde(14));
		
		while(!kunden.isEmpty()){
			Kunde k = kunden.poll();
			System.out.println(k.getId());
		}
		
	}
}
